import { BasicColumn, FormSchema } from '/@/components/Table';
export const columns: BasicColumn[] = [
  {
    title: '网关IP',
    dataIndex: 'ip',
    align: 'center',
    width: 120,
  },
  {
    title: '网关端口号',
    dataIndex: 'port',
    align: 'center',
    width: 120,
  },
  {
    title: '地址',
    dataIndex: 'addr',
    align: 'center',
    width: 120,
  },
  {
    title: '线路',
    dataIndex: 'line',
    align: 'center',
    width: 120,
  },
  {
    title: '房间号',
    dataIndex: 'room',
    align: 'center',
    width: 120,
  },
  {
    title: 'stCount',
    dataIndex: 'stCount',
    align: 'center',
    width: 120,
  },
  {
    title: '年份',
    dataIndex: 'year',
    align: 'center',
    width: 120,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'room',
    label: '房间号',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    field: 'year',
    label: '年份',
    component: 'DatePicker',
    componentProps: {
      format: 'YYYY',
      valueFormat: 'YYYY',
      picker: 'year',
    },
    colProps: { span: 6 },
  },
];

export const formSchema: FormSchema[] = [
  {
    label: 'did',
    field: 'did',
    component: 'Input',
  },
  {
    label: '房间号',
    field: 'room',
    component: 'Input',
  },
  {
    label: '线路',
    field: 'line',
    component: 'Input',
  },
  {
    label: '地址',
    field: 'addr',
    component: 'Input',
  },
  {
    label: '网关IP',
    field: 'ip',
    component: 'Input',
  },
  {
    label: '网关端口号',
    field: 'port',
    component: 'Input',
  },
  {
    label: 'stCount',
    field: 'stCount',
    component: 'Input',
  },
  {
    label: '年份',
    field: 'year',
    component: 'DatePicker',
    componentProps: {
      format: 'YYYY-MM-DD',
      valueFormat: 'YYYY',
      picker: 'year',
    },
  },
];
